#pragma once

#include"IClass.h"

class Application {
private:
	IClass* prototype;

public:
	Application(IClass* prototype):
		prototype(prototype)
	{}
	
	~Application()
	{
		delete prototype;
	}

public:
	void DoWork(){
		IClass* pro = prototype->Clone();	//通过克隆得到对应的实现
		pro->DoWork();

		delete pro;
	}
};